/*     */ package com.iris.egrant.webapp.app.struts2.proposal;
/*     */ 
/*     */

import com.iris.egrant.app.service.proposal.ProposalLocalService;
import com.iris.egrant.app.utils.IrisStringUtils;
import com.iris.egrant.model.formInit.FormBaseLibrary;
import com.iris.egrant.model.proposal.ProposalCachedExtend;
import com.iris.egrant.remote.http.service.ServiceFactory;
import com.iris.egrant.service.ServiceUtils;
import com.iris.egrant.service.proposal.ProposalNoTransService;
import com.iris.egrant.web.struts2.Struts2Utils;
import com.iris.egrant.webapp.struts2.proposal.EnterAction;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.NumberUtils;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/*     */
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class EnterLocalAction
/*     */   extends EnterAction
/*     */ {
/*     */   private static final long serialVersionUID = 5834239721177326965L;
/*     */   private Long posCode;
/*     */   private Long grantCode;
/*     */   private Long subGrantCode;
/*     */   private String subGrantNo;
/*     */   private Long helpGrantCode;
/*     */   private String enterLocation;
/*     */   private Long formCode;
/*     */   private String xmlData;
/*     */   private String statYear;
/*     */   private ProposalCachedExtend pcx;
/*     */   private int seqNo;
/*     */   private Long menuId;
/*     */   private String needPrj;
/*     */   private Long prjCode;
/*     */   private String prjNo;
/*     */   private Map<String, Object> prjMap;
/*     */   private String pdfStatus;
/*     */   private String pdfFileCode;
/*     */   @Resource(name = "serviceFactory")
/*     */   private ServiceFactory serviceFactory;
/*     */   
/*     */   public String enterProposal() throws Exception {
/* 118 */   /*  if (this.grantCode == null && this.posCode == null) {
*//* 119 *//*       Struts2Utils.getResponse().sendRedirect(Struts2Utils.getRequest().getContextPath() + "/proposal/prp-edit-list");
*//* 120 *//*       return null;
*//*     *//*     }*/
                        grantCode = 5549L;
                        posCode = 134749L;
    /* 124 */     String bulu = Struts2Utils.getParameter("bulu");
    /* 125 */     if (bulu != null && bulu.equals("bulu")) {
        /* 126 */       Struts2Utils.getRequest().setAttribute("bulu", "bulu");
        /*     */     }
    /*     */
    /* 141 */     Map<String, Object> params = new HashMap<String, Object>();
    /* 142 */     params.put("grant_code", this.grantCode);
        /* 147 */  params.put("sub_grant_code",11146L);
    /* 149 */     String orgCode = Struts2Utils.getParameter("orgCode");
    /* 150 */     String type = "1";
    /* 151 */     if (StringUtils.isNotBlank(orgCode)) {
        /* 152 */       orgCode = ServiceUtils.decodeFromDes3(orgCode);
        /* 153 */       if (NumberUtils.isNumber(orgCode)) {
            /* 154 */         params.put("org_code", Long.valueOf(Long.parseLong(orgCode)));
            /*     */       }
        /*     */     }
    /*     */
    /* 158 */     params.put("help_grant_code", this.helpGrantCode);
    /* 159 */     params.put("prj_code", this.prjCode);
    /* 160 */     params.put("pos_code", this.posCode);
    /*     */     try {
//        /* 162 */       Map<String, Object> resultMap = ((ProposalNoTransService)this.serviceFactory.getService(ProposalNoTransService.class)).getPrpLoad(params, this.posCode);
                              Map<String, Object> resultMap = ((ProposalLocalService) this.serviceFactory.getService(ProposalLocalService.class)).viewPrp(params, this.posCode);
        /* 163 */       if (resultMap == null) {
            /* 164 */         return "error";
            /*     */       }
        /*     */
        /* 167 */       FormBaseLibrary fbl = (FormBaseLibrary)resultMap.get("fbl");
        /*     */
        /*     */
        /* 170 */       this.formCode = fbl.getFormCode();
        /* 171 */       this.enterLocation = fbl.getEditIndexUrl();
        /* 172 */       this.xmlData = ObjectUtils.toString(resultMap.get("xmlData"));
        /* 173 */       this.statYear = ObjectUtils.toString(resultMap.get("statYear"));
        /* 174 */       this.pdfStatus = ObjectUtils.toString(resultMap.get("pdfStatus"));
        /* 175 */       Struts2Utils.getRequest().setAttribute("current_year", null);
        /* 176 */       Struts2Utils.getRequest().setAttribute("prp_deadline", ObjectUtils.toString(resultMap.get("prp_deadline")));
        /* 177 */       Struts2Utils.getRequest().setAttribute("pro_start_date", ObjectUtils.toString(resultMap.get("pro_start_date")));
        /* 178 */       Struts2Utils.getRequest().setAttribute("pro_end_date", ObjectUtils.toString(resultMap.get("pro_end_date")));
        /* 179 */       Struts2Utils.getRequest().setAttribute("is_first", ObjectUtils.toString(resultMap.get("is_first")));
        /* 180 */       Struts2Utils.getRequest().setAttribute("fbl", fbl);
        /* 181 */     } catch (Exception e) {
        /* 182 */       LOG.error("读取申请书数据错误:posCode=" + this.posCode, e, new String[0]);
        /* 183 */       throw e;
        /*     */     }
    /* 185 */     Struts2Utils.getRequest().setAttribute("type", type);
    /* 186 */     return "enter";
/*     */   }
/*     */   
/*     */   public String loadPage() throws Exception {
/* 240 */     this.enterLocation = "/WEB-INF/app-jsp/proposal/" + Struts2Utils.getParameter("jsp");
/* 241 */     return "enter";
/*     */   }
/*     */ 
/*     */   
/*     */   public String getEnterLocation() {
/* 246 */     return this.enterLocation;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setEnterLocation(String enterLocation) {
/* 251 */     this.enterLocation = enterLocation;
/*     */   }
/*     */ 
/*     */   
/*     */   public String getXmlData() {
/* 256 */     return this.xmlData;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setXmlData(String xmlData) {
/* 261 */     xmlData = IrisStringUtils.filterSupplementaryChars(xmlData);
/* 262 */     this.xmlData = xmlData;
/*     */   }
/*     */ 
/*     */   
/*     */   public Long getMenuId() {
/* 267 */     return this.menuId;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setMenuId(Long menuId) {
/* 272 */     this.menuId = menuId;
/*     */   }
/*     */ 
/*     */   
/*     */   public Long getPosCode() {
/* 277 */     return this.posCode;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setPosCode(Long posCode) {
/* 282 */     this.posCode = posCode;
/*     */   }
/*     */ 
/*     */   
/*     */   public int getSeqNo() {
/* 287 */     return this.seqNo;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setSeqNo(int seqNo) {
/* 292 */     this.seqNo = seqNo;
/*     */   }
/*     */ 
/*     */   
/*     */   public String getSubGrantNo() {
/* 297 */     return this.subGrantNo;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setSubGrantNo(String subGrantNo) {
/* 302 */     this.subGrantNo = subGrantNo;
/*     */   }
/*     */ 
/*     */   
/*     */   public Long getGrantCode() {
/* 307 */     return this.grantCode;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setGrantCode(Long grantCode) {
/* 312 */     this.grantCode = grantCode;
/*     */   }
/*     */ 
/*     */   
/*     */   public Long getFormCode() {
/* 317 */     return this.formCode;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setFormCode(Long formCode) {
/* 322 */     this.formCode = formCode;
/*     */   }
/*     */ 
/*     */   
/*     */   public String getStatYear() {
/* 327 */     return this.statYear;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setStatYear(String statYear) {
/* 332 */     this.statYear = statYear;
/*     */   }
/*     */ 
/*     */   
/*     */   public ProposalCachedExtend getPcx() {
/* 337 */     return this.pcx;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setPcx(ProposalCachedExtend pcx) {
/* 342 */     this.pcx = pcx;
/*     */   }
/*     */ 
/*     */   
/*     */   public Long getSubGrantCode() {
/* 347 */     return this.subGrantCode;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setSubGrantCode(Long subGrantCode) {
/* 352 */     this.subGrantCode = subGrantCode;
/*     */   }
/*     */ 
/*     */   
/*     */   public Long getHelpGrantCode() {
/* 357 */     return this.helpGrantCode;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setHelpGrantCode(Long helpGrantCode) {
/* 362 */     this.helpGrantCode = helpGrantCode;
/*     */   }
/*     */ 
/*     */   
/*     */   public String getNeedPrj() {
/* 367 */     return this.needPrj;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setNeedPrj(String needPrj) {
/* 372 */     this.needPrj = needPrj;
/*     */   }
/*     */ 
/*     */   
/*     */   public Long getPrjCode() {
/* 377 */     return this.prjCode;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setPrjCode(Long prjCode) {
/* 382 */     this.prjCode = prjCode;
/*     */   }
/*     */ 
/*     */   
/*     */   public String getPrjNo() {
/* 387 */     return this.prjNo;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setPrjNo(String prjNo) {
/* 392 */     this.prjNo = prjNo;
/*     */   }
/*     */ 
/*     */   
/*     */   public Map<String, Object> getPrjMap() {
/* 397 */     return this.prjMap;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setPrjMap(Map<String, Object> prjMap) {
/* 402 */     this.prjMap = prjMap;
/*     */   }
/*     */ 
/*     */   
/*     */   public String getPdfStatus() {
/* 407 */     return this.pdfStatus;
/*     */   }
/*     */ 
/*     */ 
/*     */   
/*     */   public void setPdfStatus(String pdfStatus) {
/* 413 */     if (pdfStatus == null) {
/* 414 */       this.pdfStatus = null;
/*     */     } else {
/* 416 */       this.pdfStatus = pdfStatus;
/*     */     } 
/*     */   }
/*     */ 
/*     */   
/*     */   public String getPdfFileCode() {
/* 422 */     return this.pdfFileCode;
/*     */   }
/*     */ 
/*     */   
/*     */   public void setPdfFileCode(String pdfFileCode) {
/* 427 */     this.pdfFileCode = pdfFileCode;
/*     */   }
/*     */ }


/* Location:              D:\文件\123\WEB-INF\classes\!\com\iris\egrant\webapp\app\struts2\proposal\EnterLocalAction.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       1.1.3
 */